@charset "UTF-8";
////////sass函数////////

//不透明度
@mixin sys-opacity($opacity:0.5, $compatible-flag:1){
    $value:$opacity * 100;
    @if $compatible-flag == -1 {
        filter:alpha(opacity=#{$value});
    }
    @if $compatible-flag == 0 {
        opacity:$opacity;
    }
    @if $compatible-flag == 1 {
        opacity:$opacity;
        filter:alpha(opacity=#{$value});
    }
}

//兼容inline-block
@mixin sys-inline-block($compatible-flag:0){
    @if $compatible-flag == -1 {
        *display:inline;
        *zoom:1;
    }
    @if $compatible-flag == 0 {
        display:inline-block;
    }
    @if $compatible-flag == 1 {
        display:inline-block;
        *display:inline;
        *zoom:1;
    }
}

//inline-block重置
@mixin sys-inline-block-reset($compatible-flag:0){
    @if $compatible-flag == -1 {
        *letter-spacing: normal;// IE < 8 重置
    }
    @if $compatible-flag == 0 {
        font-size:0;
        letter-spacing:-0.31em; // webkit
        word-spacing: -0.43em;// IE < 8 && gecko
    }
    @if $compatible-flag == 1 {
        font-size:0;
        letter-spacing:-0.31em; // webkit
        word-spacing: -0.43em;// IE < 8 && gecko
        *letter-spacing: normal;// IE < 8 重置
    }
}

// 盒子模型
@mixin sys-border-box(){
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

//清除浮动,IE8以上
@mixin sys-pseudo-clear{
    &:after{
        content:" ";
        display:block;
        overflow:hidden;
        clear:both;
        height:0;
    }
}

//链接
@mixin sys-text-url(){
    cursor:pointer;
    &,&:hover,&:focus,&.active{
        text-decoration:none;
        outline:none;
    }
}

//链接悬浮
@mixin sys-text-link($color-hover){
    &:hover,&:focus,&:active,&.active{
        color:$color-hover;
    }
}

// 按钮
@mixin sys-btn-func($color-bg:#ccc, $color-text:#fff, $color-border:#ccc){
    color:$color-text;
    background-color:$color-bg;
    border-color:$color-border;
    &:hover,&:focus,&:active,&.active{
        color:$color-text;
        background-color:darken($color-bg, 5%);
    }
    &.disabled{
        @include sys-disabled();
        &:hover,&:focus,&:active,&.active{
            color:$color-text;
            background-color:$color-bg;
        }
    }
}

// 边框按钮
@mixin sys-btn-border-func($color-bg:#ccc, $color-text:#fff){
    color:$color-text;
    background-color:$color-bg;
    border:1px solid $color-text;
    &:hover,&:focus,&:active,&.active{
        color:$color-text;
        border-color:darken($color-text, 5%);
    }
}

//去除列表默认样式
@mixin sys-list-none{
    padding-left:0;
    &,& > li{
        list-style:none;
    }
}

//文字省略
@mixin sys-ellipsis($height:none, $width:none){
    @if type-of($height) == 'number'{
        height:$height;
        line-height:$height;
    }
    @if type-of($width) == 'number'{
        width:$width;
    }
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}

//字符截取
@mixin sys-text-camp($row:1, $h-line:none, $width:none){
    overflow:hidden;
    @if type-of($h-line) == 'number'{
        height:$row * $h-line;
        line-height:$h-line;
    }
    @if type-of($width) == 'number'{
        width:$width;
    }
    text-overflow:ellipsis;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:$row;
}

//placeholder设置
@mixin sys-placeholder($color:#bbb){
    input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {// Safari and Chrome
        color:$color;
    }
    input:-moz-placeholder, textarea:-moz-placeholder {// Firefox 4-18
        color:$color;
    }
    input::-moz-placeholder, textarea::-moz-placeholder {// Firefox 19+
        color:$color;
    }
    input:-ms-input-placeholder, textarea:-ms-input-placeholder {// Internet Explorer 10+
        color:$color;
    }
}

//透明背景颜色兼容
@mixin sys-bg-rgba($r, $g, $b, $a, $color:0){
    @if type_of($color) == number{
        $start:ie-hex-str(rgba($r, $g, $b, $a));
        $end:ie-hex-str(rgba($r, $g, $b, $a));
        filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#{$start}', endColorstr='#{$end}');
    }@else{
        background:$color;
    }
    background:rgba($r, $g, $b, $a);
}

//线性渐变
@mixin sys-gradient ($origin: left, $start: #ffffff, $stop: #000000) {//top,left,bottom,right
    background-color: $start;
    background: -webkit-linear-gradient($origin, $start, $stop);
    background: -moz-linear-gradient($origin, $start, $stop);
    background: -o-linear-gradient($origin, $start, $stop);
    background: -ms-linear-gradient($origin, $start, $stop);
    background: linear-gradient($origin, $start, $stop);
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start}',endColorstr='#{$stop}');
    //低于Internet Explorer 版本8
    -ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start}',endColorstr='#{$stop}');
}
//径向渐变
@mixin sys-gradient-radial($type:circle, $start: #ffffff, $stop: #000000){
    background: -webkit-radial-gradient($type, $start, $stop);
    background: -moz-radial-gradient($type, $start, $stop);
    background: -o-radial-gradient($type, $start, $stop);
    background: -ms-radial-gradient($type, $start, $stop);
    background: radial-gradient($type, $start, $stop);
}

//hr线
@mixin sys-hr-line($color:#ccc, $width:1px, $style:solid, $location:top){
    height:0;
    border:none;
    border-#{$location}:$width $style $color;
}

//兼容阴影
@mixin sys-box-shadow($arguments...){
    -webkit-box-shadow:$arguments;
    -moz-box-shadow:$arguments;
    box-shadow:$arguments;
}
//兼容ie隐藏
@mixin sys-box-shadow-ms($h-shadow:0,$v-shadow:0,$blur:2px,$spread:2px,$color:#eeeeee){
    -webkit-box-shadow:$h-shadow $v-shadow $blur $spread $color;
    -moz-box-shadow:$h-shadow $v-shadow $blur $spread $color;
    box-shadow:$h-shadow $v-shadow $blur $spread $color;
    $strength:round($blur);
    //低于Internet Explorer 版本8
    filter:progid:DXImageTransform.Microsoft.Shadow(color='#{$color}', direction=0, strength='#{$strength}') progid:DXImageTransform.Microsoft.Shadow(color='#{$color}', direction=90, strength='#{$strength}') progid:DXImageTransform.Microsoft.Shadow(color='#{$color}' direction=180, strength='#{$strength}') progid:DXImageTransform.Microsoft.Shadow(color='#{$color}', direction=270, strength='#{$strength}');
    // IE9+及标准浏览器支持，IE8及更低版本只能通过滤镜或通过背景图片实现
    -ms-filter:progid:DXImageTransform.Microsoft.Shadow(color='#{$color}',direction=0,strength='#{$strength}') progid:DXImageTransform.Microsoft.Shadow(color='#{$color}',direction=90,strength='#{$strength}') progid:DXImageTransform.Microsoft.Shadow(color='#{$color}',direction=180,strength='#{$strength}') progid:DXImageTransform.Microsoft.Shadow(color='#{$color}',direction=270,strength='#{$strength}');
}

//圆角
@mixin sys-border-radius($radius:5px){
    -moz-border-radius:$radius;
    -webkit-border-radius:$radius;
    border-radius:$radius;
}
@mixin sys-border-topleft-radius($radius:5px){
    -moz-border-radius-topleft:$radius;
    -webkit-border-top-left-radius:$radius;
    border-top-left-radius:$radius;
}
@mixin sys-border-topright-radius($radius:5px){
    -moz-border-radius-topright:$radius;
    -webkit-border-top-right-radius:$radius;
    border-top-right-radius:$radius;
}
@mixin sys-border-bottomright-radius($radius:5px){
    -moz-border-radius-bottomright:$radius;
    -webkit-border-bottom-right-radius:$radius;
    border-bottom-right-radius:$radius;
}
@mixin sys-border-bottomleft-radius($radius:5px){
    -moz-border-radius-bottomleft:$radius;
    -webkit-border-bottom-left-radius:$radius;
    border-bottom-left-radius:$radius;
}

//前缀控制
$prefix-for-w3c:         true;
$prefix-for-webkit:       true;
$prefix-for-moz:      true;
$prefix-for-o:        true;
$prefix-for-ms:    true;
@mixin prefix-for-all($flag-w3c:true, $flag-webkit:true, $flag-moz:true, $flag-o:true, $flag-ms:true) {
    @if $flag-w3c == true{
        $flag-w3c : true
    }@else{
        $flag-w3c : false
    }
    $prefix-for-w3c:      $flag-w3c!global;

    @if $flag-webkit == true{
        $flag-webkit : true;
    }@else{
        $flag-webkit : false;
    }
    $prefix-for-webkit:    $flag-webkit!global;

    @if $flag-moz == true{
        $flag-moz : true;
    }@else{
        $flag-moz : false;
    }
    $prefix-for-moz:   $flag-moz!global;

    @if $flag-o == true{
        $flag-o : true;
    }@else{
        $flag-o : false;
    }
    $prefix-for-o:     $flag-o!global;

    @if $flag-ms == true{
        $flag-ms : true;
    }@else{
        $flag-ms : false;
    }
    $prefix-for-ms: $flag-ms!global;
}

//设置前缀
@mixin sys-prefix-add($name, $value, $w3c:true, $webkit:true, $moz:true, $o:true, $ms:true){
    @if $prefix-for-w3c == true{
        @if $w3c == true{
            #{$name}:$value;
        }
    }
    @if $prefix-for-webkit == true {
        @if $webkit == true {
            -webkit-#{$name}: $value;
        }
    }
    @if $prefix-for-moz == true {
        @if $moz == true {
            -moz-#{$name}: $value;
        }
    }
    @if $prefix-for-o == true {
        @if $o == true {
            -o-#{$name}: $value;
        }
    }
    @if $prefix-for-ms == true {
        @if $ms == true {
            -ms-#{$name}: $value;
        }
    }
}

//css3动画
@mixin sys-animation($arguments...){
    animation: $arguments;
    -moz-animation: $arguments;
    -webkit-animation: $arguments;
    -o-animation: $arguments;
    -ms-animation: $arguments;
}
@mixin sys-animation-name($name){
    animation-name: $name;
    -moz-animation-name: $name;
    -webkit-animation-name: $name;
    -o-animation-name: $name;
    -ms-animation-name: $name;
}
@mixin sys-animation-duration($duration){
    animation-duration: $duration;
    -moz-animation-duration: $duration;
    -webkit-animation-duration: $duration;
    -o-animation-duration: $duration;
    -ms-animation-duration: $duration;
}
@mixin sys-animation-timing-function($timing-function){
    animation-timing-function: $timing-function;
    -moz-animation-timing-function: $timing-function;
    -webkit-animation-timing-function: $timing-function;
    -o-animation-timing-function: $timing-function;
    -ms-animation-timing-function: $timing-function;
}
@mixin sys-animation-delay($delay){
    animation-delay: $delay;
    -moz-animation-delay: $delay;
    -webkit-animation-delay: $delay;
    -o-animation-delay: $delay;
    -ms-animation-delay: $delay;
}
@mixin sys-animation-iteration-count($iteration-count){
    animation-iteration-count: $iteration-count;
    -moz-animation-iteration-count: $iteration-count;
    -webkit-animation-iteration-count: $iteration-count;
    -o-animation-iteration-count: $iteration-count;
    -ms-animation-iteration-count: $iteration-count;
}
@mixin sys-animation-direction($direction){
    animation-direction: $direction;
    -moz-animation-direction: $direction;
    -webkit-animation-direction: $direction;
    -o-animation-direction: $direction;
    -ms-animation-direction: $direction;
}
@mixin sys-animation-fill-mode($mode){
    animation-fill-mode: $mode;
    -moz-animation-fill-mode: $mode;
    -webkit-animation-fill-mode: $mode;
    -o-animation-fill-mode: $mode;
    -ms-animation-fill-mode: $mode;
}
@mixin sys-animation-name($name){
    animation-name: $name;
    -moz-animation-name: $name;
    -webkit-animation-name: $name;
    -o-animation-name: $name;
    -ms-animation-name: $name;
}
@mixin sys-keyframes ($name, $w3c:true, $webkit:true, $moz:true, $o:true, $ms:true) {
    @if $w3c == true{
        @include prefix-for-all(0, 0, 0, 0, 0);
        $prefix-for-w3c:true !global;
        @keyframes #{$name} {
            @content
        }
    }
    @if $webkit == true{
        @include prefix-for-all(0, 0, 0, 0, 0);
        $prefix-for-webkit:true !global;
        @-webkit-keyframes #{$name} {
            @content
        }
    }
    @if $moz == true{
        @include prefix-for-all(0, 0, 0, 0, 0);
        $prefix-for-moz:true !global;
        @-moz-keyframes #{$name} {
            @content
        }
    }
    @if $o == true{
        @include prefix-for-all(0, 0, 0, 0, 0);
        $prefix-for-o:true !global;
        @-o-keyframes #{$name} {
            @content
        }
    }
    @if $ms == true{
        @include prefix-for-all(0, 0, 0, 0, 0);
        $prefix-for-ms:true !global;
        @-ms-keyframes #{$name} {
            @content
        }
    }
    @include prefix-for-all(0, 0, 0, 0, 0);
}

//div {
//    animation: myfirst 5s;
//    -moz-animation: myfirst 5s;	/* Firefox */
//    -webkit-animation: myfirst 5s;	/* Safari 和 Chrome */
//    -o-animation: myfirst 5s;	/* Opera */
//    -ms-animation: myfirst 5s;	/* ms */
//}
//@keyframes myfirst
//{
//    from {background: red;}
//    to {background: yellow;}
//}
//
//@-moz-keyframes myfirst /* Firefox */
//{
//    from {background: red;}
//    to {background: yellow;}
//}
//
//@-webkit-keyframes myfirst /* Safari 和 Chrome */
//{
//    from {background: red;}
//    to {background: yellow;}
//}
//
//@-o-keyframes myfirst /* Opera */
//{
//    from {background: red;}
//    to {background: yellow;}
//}
//
//@-ms-keyframes myfirst /* ms */
//{
//    from {background: red;}
//    to {background: yellow;}
//}

//转换
@mixin sys-transform($arguments...){
    transform:$arguments;
    -ms-transform:$arguments; 	// IE 9
    -moz-transform:$arguments; 	// Firefox
    -webkit-transform:$arguments; // Safari 和 Chrome
    -o-transform:$arguments; 	// Opera
}

//2d旋转
@mixin sys-rotate($degrees) {
    -webkit-transform: rotate($degrees);
    -moz-transform: rotate($degrees);
    -ms-transform: rotate($degrees);
    -o-transform: rotate($degrees);
    transform: rotate($degrees);
}
@mixin sys-rotatex($degrees) {
    -webkit-transform: rotateX($degrees);
    -moz-transform: rotateX($degrees);
    -ms-transform: rotateX($degrees);
    -o-transform: rotateX($degrees);
    transform: rotateX($degrees);
}
@mixin sys-rotatey($degrees) {
    -webkit-transform: rotateY($degrees);
    -moz-transform: rotateY($degrees);
    -ms-transform: rotateY($degrees);
    -o-transform: rotateY($degrees);
    transform: rotateY($degrees);
}
@mixin sys-rotatez($degrees) {
    -webkit-transform: rotateZ($degrees);
    -moz-transform: rotateZ($degrees);
    -ms-transform: rotateZ($degrees);
    -o-transform: rotateZ($degrees);
    transform: rotateZ($degrees);
}

//缩放
@mixin sys-scale($ratioX:1, $ratioY:1) {
    -webkit-transform: scale($ratioX, $ratioY);
    -moz-transform: scale($ratioX, $ratioY);
    -ms-transform: scale($ratioX, $ratioY);
    -o-transform: scale($ratioX, $ratioY);
    transform: scale($ratioX, $ratioY);
}
@mixin sys-scalex($ratio:1) {
    -webkit-transform: scaleX($ratio);
    -moz-transform: scaleX($ratio);
    -ms-transform: scaleX($ratio);
    -o-transform: scaleX($ratio);
    transform: scaleX($ratio);
}
@mixin sys-scaley($ratio:1) {
    -webkit-transform: scaleY($ratio);
    -moz-transform: scaleY($ratio);
    -ms-transform: scaleY($ratio);
    -o-transform: scaleY($ratio);
    transform: scaleY($ratio);
}
@mixin sys-scalez($ratio:1) {
    -webkit-transform: scaleZ($ratio);
    -moz-transform: scaleZ($ratio);
    -ms-transform: scaleZ($ratio);
    -o-transform: scaleZ($ratio);
    transform: scaleZ($ratio);
}

//2d转化
@mixin sys-translate($x:0, $y:0) {
    -webkit-transform: translate($x, $y);
    -moz-transform: translate($x, $y);
    -ms-transform: translate($x, $y);
    -o-transform: translate($x, $y);
    transform: translate($x, $y);
}
@mixin sys-translatex($x:0) {
    -webkit-transform: translateX($x);
    -moz-transform: translateX($x);
    -ms-transform: translateX($x);
    -o-transform: translateX($x);
    transform: translateX($x);
}
@mixin sys-translatey($y:0) {
    -webkit-transform: translateY($y);
    -moz-transform: translateY($y);
    -ms-transform: translateY($y);
    -o-transform: translateY($y);
    transform: translateY($y);
}

//2D 倾斜转换
@mixin sys-skew($x, $y) {
    -webkit-transform: skew($x, $y);
    -moz-transform: skew($x, $y);
    -ms-transform: skewX($x) skewY($y);
    -o-transform: skew($x, $y);
    transform: skew($x, $y);
    -webkit-backface-visibility: hidden;
}

//3d旋转
@mixin sys-translate3d($x:0, $y:0, $z:0) {
    -webkit-transform: translate3d($x, $y, $z);
    -moz-transform: translate3d($x, $y, $z);
    -o-transform: translate3d($x, $y, $z);
    transform: translate3d($x, $y, $z);
}

//过渡
@mixin sys-transition($name:all, $time:0.5s, $timing-function:ease){
    transition:$name $time $timing-function;
    -moz-transition:$name $time $timing-function;
    -webkit-transition:$name $time $timing-function;
    -o-transition:$name $time $timing-function;
    -ms-transition:$name $time $timing-function;
}
@mixin sys-transition-fix($name:all, $time:0.5s, $timing-function:ease, $delay:0s){
    $w3cName : $name;
    $webkitName : $name;
    $mozName : $name;
    $oName : $name;
    $msName : $name;
    $webkitName : -webkit- + $name;
    $mozName : -moz- + $name;
    $oName : -o- + $name;
    $msName : -ms- + $name;
    transition:$w3cName $time $timing-function $delay;
    -webkit-transition:$webkitName $time $timing-function $delay;
    -moz-transition:$mozName $time $timing-function $delay;
    -o-transition:$oName $time $timing-function $delay;
    -ms-transition:$msName $time $timing-function $delay;
}

//过渡属性名
@mixin sys-transition-property($arguments...){
    transition-property: $arguments;
    -webkit-transition-property: $arguments;
    -moz-transition-property: $arguments;
    -o-transition-property: $arguments;
    -ms-transition-property: $arguments;
}

//过渡时间
@mixin sys-transition-duration($duration:0.5s){
    transition-duration: $duration;
    -webkit-transition-duration: $duration;
    -moz-transition-duration: $duration;
    -o-transition-duration: $duration;
    -ms-transition-duration:$duration;
}

//尖角
@mixin sys-triangle($top-width:5px, $right-width:5px, $color:#ccc, $type:left){
    overflow:hidden;
    display:block;
    width:0;
    height:0;
    border-style:solid;
    border-width:$top-width $right-width;
    @if $type == top{
        border-color:$color transparent transparent transparent;
    }@else if $type == right{
        border-color:transparent $color transparent transparent;
    }@else if $type == bottom{
        border-color:transparent transparent $color transparent;
    }@else{
        border-color:transparent transparent transparent $color;
    }
}

//兼容圆角
@mixin sys-little-radius($width:5px,$border-width:1px,$bgurl:''){
    $trans:-$width;
    color:#fff;
    .radi{
        position:absolute;
        width:$width;
        height:$width;
        z-index:0;
        background:url("#{$bgurl}") no-repeat;
    }
    .radi-lt{
        left:-$border-width;
        top:-$border-width;
        background-position:0 0;
    }
    .radi-rt{
        right:-$border-width;
        top:-$border-width;
        background-position:$trans 0;
    }
    .radi-lb{
        left:-$border-width;
        bottom:-$border-width;
        background-position:0 $trans;
    }
    .radi-rb{
        right:-$border-width;
        bottom:-$border-width;
        background-position:$trans $trans;
    }
}

//文字选中
@mixin sys-user-select($result:none){
    -moz-user-select: $result;//火狐
    -webkit-user-select: $result;//webkit浏览器
    -ms-user-select: $result;//IE10
    -khtml-user-select: $result;//早期浏览器
    user-select: $result;
}
//文字选中状态
@mixin sys-user-select-status($el:div){
    #{$el}::selection {@content}
    #{$el}::-moz-selection {@content}
    #{$el}::-webkit-selection {@content}
}

//禁用公用
@mixin sys-disabled(){
    @include sys-opacity(0.7);
    @include sys-user-select(none);
    cursor:not-allowed;
}

//子元素居中
@mixin sys-vertical($height:200px){
    height:$height;
    line-height:$height - 4;
    //font-size:@height / 2;
    *font-size:$height - ceil($height / 4);
}

//图片水平垂直居中
@mixin sys-center-vertical-cell($cell-height:200px, $cell-width:none, $target:img){
    display:block;
    overflow:hidden;
    @if type_of($cell-width) == number{
        width:$cell-width;
    }
    @include sys-vertical($cell-height);
    text-align:center;
    #{$target}{
        @include sys-inline-block();
        vertical-align:middle;
        max-width:100%;
        max-height:100%;
    }
}

//窗口fixed水平垂直居中
@mixin sys-fixed-center-vertical($width, $height){
    position:fixed;
    @if (type_of($width) == number){
        margin-left:0 - $width / 2;
        width:$width;
        left:50%;
    }
    @if (type_of($height) == number){
        margin-top:0 - $height / 2;
        height:$height;
        top:50%;
    }
}

//循环遍历设置属性
@mixin sys-loop-property($total:12, $pre:col-, $key:width, $start:1){
    .#{$pre}#{$start}{
        #{$key}:unquote($start * 100 / 12 + '%');
    }
    @if($start < $total){
        @include sys-loop-property($total, $pre, $key, $start + 1);
    }
}

//进度条
@mixin sys-process-bar($width:5px, $height:5px, $bgImg:0, $bgtop:0){
    width:$width;
    height:$height;
    .process-percent{
        width:0;
        height:$height;
    }
    @if (type_of($bgImg) == string){
        background:url($bgImg) no-repeat 0 $bgtop;
        .process-percent{
            background:url($bgImg) no-repeat 0 $bgtop - $height;
        }
    }
}

//前横线
@mixin sys-border-horizon-before($color-b:$color-border){
    &:before {
        content: " ";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 1px;
        @include sys-scaley(0.5);
        background-color: $color-b;
    }
}
//后横线
@mixin sys-border-horizon-after($color-b:$color-border){
    &:after {
        content: " ";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
        @include sys-scaley(0.5);
        background-color: $color-b;
    }
}
//前竖线
@mixin sys-border-vertical-before($color-b:$color-border){
    &:before {
        content: " ";
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 1px;
        @include sys-scalex(0.5);
        background-color: $color-b;
    }
}
//后竖线
@mixin sys-border-vertical-after($color-b:$color-border){
    &:after {
        content: " ";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 1px;
        @include sys-scalex(0.5);
        background-color: $color-b;
    }
}

//flex布局
@mixin sys-flex(){
    display:-webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
}

//项目的排列方向,row | row-reverse | column | column-reverse;
@mixin sys-flex-direction($value:row){
    @if($value == row){
        -webkit-box-orient: horizontal;
    }
    @if($value == column){
        -webkit-box-orient: vertical;
    }
    -webkit-flex-direction: $value;
    -moz-flex-direction: $value;
    -ms-flex-direction: $value;
    -o-flex-direction: $value;
    flex-direction: $value;
}

//项目在主轴上的对齐方式,flex-start | flex-end | center | space-between | space-around;
@mixin sys-justify-content($value:flex-start){
    @if($value == flex-start){
        -webkit-box-pack: start;
    }
    @if($value == flex-end){
        -webkit-box-pack: end;
    }
    -webkit-justify-content: $value;
    -moz-justify-content: $value;
    -ms-justify-content: $value;
    -o-justify-content: $value;
    justify-content: $value;
}

//项目在交叉轴上如何对齐,flex-start | flex-end | center | baseline | stretch;
@mixin sys-align-items($value:flex-start){
    @if($value == flex-start){
        -webkit-box-align: start;
    }
    @if($value == flex-end){
        -webkit-box-align: end;
    }
    -webkit-align-items: $value;
    -moz-align-items: $value;
    -ms-align-items: $value;
    -o-align-items: $value;
    align-items: $value;
}

//如果一条轴线排不下，如何换行
@mixin sys-flex-wrap($value:nowrap){
    -webkit-flex-wrap: $value;
    -moz-flex-wrap: $value;
    -ms-flex-wrap: $value;
    -o-flex-wrap: $value;
    flex-wrap:$value;
}

//项目的放大比例，默认为0，即如果存在剩余空间，也不放大
@mixin sys-flex-grow($value:0){
    -webkit-flex-grow: $value;
    -moz-flex-grow: $value;
    -ms-flex-grow: $value;
    flex-grow: $value;
}

//项目的缩小比例，默认为1，即如果空间不足，该项目将缩小
@mixin sys-flex-shrink($value:1){
    -webkit-flex-shrink: $value;
    -moz-flex-shrink: $value;
    -ms-flex-shrink: $value;
    flex-shrink: $value;
}

//分配多余空间之前，项目占据的主轴空间（main size）。浏览器根据这个属性，计算主轴是否有多余空间。它的默认值为auto，即项目的本来大小
@mixin sys-flex-basis($value:auto){
    -webkit-flex-basis: $value;
    -moz-flex-basis: $value;
    -ms-flex-basis: $value;
    flex-basis: $value;
}

//项目的放大、缩小、原始比例，默认为0 1 auto
@mixin sys-flex-item($value:0){
    box-flex:$value;
    -webkit-box-flex:$value;
    -moz-box-flex:$value;

    -webkit-flex: $value;
    -moz-flex: $value;
    -ms-flex: $value;
    flex: $value;
}

//允许单个项目有与其他项目不一样的对齐方式
@mixin sys-align-self($value:auto){
    -webkit-align-self: $value;
    align-self: $value;
}


////////复杂组件函数////////
//文本列表
@mixin sys-text-list-public($dd-height:34px,$icon-unit:4px,$dl-padding:17px 0,$border-color:#cecece,$dd-margin:0 44px 0 23px){
    dl,ul,ol{
        padding:$dl-padding;
        *float:left;
        *width:100%;
        border-bottom:1px dashed $border-color;
    }
    dd,li{
        overflow:hidden;
        margin:$dd-margin;
        height:$dd-height + 1;
    }
    .list-icon{
        float:left;
        margin-top:($dd-height - $icon-unit) / 2;
        width:$icon-unit;
        height:$icon-unit;
        background:#1281bf;
    }
    .text{
        margin-left:10px;
        height:$dd-height;
        line-height:$dd-height;
        text-indent:10px;
        a{
            display:block;
            @include sys-ellipsis();
            margin-right:70px;
        }
    }
    .time{
        float:right;
        color:#999;
    }
}

//图片列表
@mixin sys-image-list-public($li-width:225px, $cell-height:155px, $li-right:51px, $li-top:34px, $text-top:16px, $list-padding:0 5px, $list-height:none, $cell-border:1px, $line-height-dif:4, $li-border:0){
    $border-color:#cecece;
    overflow:hidden;
    padding:$list-padding;
    ul{
        margin-right:0 - $li-right;
        padding:0;
    }
    li{
        float:left;
        margin:$li-top $li-right 0 0;
        padding:0;
        width:$li-width;
        border-width:$li-border;
        @if(type-of($list-height) == 'number'){
            height:$list-height;
        }
        p{
            margin-top:$text-top;
            @include sys-ellipsis(26px);
            text-align:center;
        }
    }
    .cell{
        @include sys-center-vertical-cell($cell-height, $li-width - 2 * $cell-border - 2 * $li-border);
        border:$cell-border solid $border-color;
    }
}

//图文列表
@mixin sys-list-image-text-public($cell-width:240px, $cell-height:180px, $li-padding:20px, $color-more:#ee7638, $line-height:24px, $border-color:#eee, $border-width:1px){
    li{
        overflow:hidden;
        padding-bottom:$li-padding;
        border-bottom:$border-width solid $border-color;
        & + li{
            margin-top:$li-padding;
        }
    }
    .cell{
        float:left;
        margin-right:15px;
        @include sys-center-vertical-cell($cell-height, $cell-width);
    }
    .intro{
        overflow:hidden;
    }
    .item{
        font-size:16px;
        color:#333;
    }
    .time{
        margin:5px 0 15px;
        padding:0;
        color:#999;
    }
    .text{
        margin-right:5px;
        color:#666;
        line-height:$line-height;
        .more{
            color:$color-more;
        }
    }
}

//自适应rem配置
$view-base:640;//750,1125
$rem-font-size-num:40;//默认40px
$rem-font-base:1rem * $rem-font-size-num;
$rem-loop-num:20;//遍历间隔
$rem-column: 10;
@mixin sys-rem-set($view-base:640){//默认设计图尺寸宽度
    $font-px-base:1px * $rem-font-size-num;
    ////尺寸计算1////页面设置：div{width:实际宽度 / $rem-font-base}
    //尺寸设置
    html {
        font-size: ceil($font-px-base * $view-base / $view-base);
    }
    @include sys-rem-loop(200, $view-base, $font-px-base);

    ////尺寸计算2////页面设置：div{width:实际宽度 / $rem-font-base}
    //(min-width:200px)
//    $view-xxs-font-size:ceil($font-px-base * 200 / $view-base);
//    //(min-width:320px)
//    $view-xs-font-size:ceil($font-px-base * 320 / $view-base);
//    //(min-width:480px)
//    $view-sm-font-size:ceil($font-px-base * 480 / $view-base);
//    //(min-width:640)
//    $view-ms-font-size:ceil($font-px-base * 640 / $view-base);
//    //(min-width:720)
//    $view-md-font-size:ceil($font-px-base * 720 / $view-base);
//    //(min-width:980)
//    $view-lg-font-size:ceil($font-px-base * 980 / $view-base);
//    //(min-width:1200)
//    $view-xl-font-size:ceil($font-px-base * 1200 / $view-base);
//    //尺寸设置
//    html{
//        font-size:$view-ms-font-size;
//    }
//    @media (min-width:200px){
//        html {
//            font-size:$view-xxs-font-size
//        }
//    }
//    @media (min-width:320px){
//        html {
//            font-size:$view-xs-font-size
//        }
//    }
//    @media (min-width:480px){
//        html {
//            font-size: $view-sm-font-size;
//        }
//    }
//    @media (min-width:640px) {
//        html {
//            font-size: $view-ms-font-size
//        }
//    }
//    @media (min-width:720px) {
//        html {
//            font-size: $view-md-font-size
//        }
//    }
//    @media (min-width:980px) {
//        html {
//            font-size: $view-lg-font-size
//        }
//    }
//    @media (min-width:1200px) {
//        html {
//            font-size: $view-xl-font-size
//        }
//    }

    ////尺寸计算3////页面设置：div{$rem-column * 实际宽度 / 设计图宽度}
    //尺寸设置
//    html {
//        font-size: ceil($view-base / $rem-column);
//    }
//    @include sys-rem-loop3(200, $view-base, $rem-column);
}
//循环设置不同宽度的rem
@mixin sys-rem-loop($width : 200, $view-base : 640, $font-px-base : 40px){
    @while $width < $view-base + 1 {
        $widthpix : $width * 1px;
        @media (min-width: $widthpix) {
            html {
                font-size: ceil($font-px-base * $width / $view-base);
            }
        }
        $width : $width + $rem-loop-num;
    }
}

//循环设置不同宽度的rem
@mixin sys-rem-loop3($width : 200, $view-base : 640, $rem-column : 10){
    @while $width < $view-base + 1 {
        $widthpix : $width * 1px;
        @media (min-width: $widthpix) {
            html {
                font-size: ceil($width / $rem-column);
            }
        }
        $width : $width + $rem-loop-num;
    }
}

//自适应em配置
$em-font-size-px:1px * $rem-font-size-num;
$em-font-base:1em * $rem-font-size-num;
@mixin sys-em-set($view-base: 640, $class:ems){//默认设计图尺寸宽度
    $font-px-base:1px * $rem-font-size-num;
    ////尺寸计算1////
    //尺寸设置
    .#{$class} {
        font-size: ceil($font-px-base * $view-base / $view-base);
    }
    @include sys-em-loop(200, $view-base, $font-px-base, $class);

    ////尺寸计算2////
    //(min-width:200px)
//    $view-xxs-font-size:ceil($font-px-base * 200 / $view-base);
//    //(min-width:320px)
//    $view-xs-font-size:ceil($font-px-base * 320 / $view-base);
//    //(min-width:480px)
//    $view-sm-font-size:ceil($font-px-base * 480 / $view-base);
//    //(min-width:640)
//    $view-ms-font-size:ceil($font-px-base * 640 / $view-base);
//    //(min-width:720)
//    $view-md-font-size:ceil($font-px-base * 720 / $view-base);
//    //(min-width:980)
//    $view-lg-font-size:ceil($font-px-base * 980 / $view-base);
//    //(min-width:1200)
//    $view-xl-font-size:ceil($font-px-base * 1200 / $view-base);
//    //尺寸设置
//    .#{$class} {
//        font-size: $view-ms-font-size;
//    }
//    @media (min-width: 200px) {
//        .#{$class} {
//            font-size: $view-xxs-font-size
//        }
//    }
//    @media (min-width: 320px) {
//        .#{$class} {
//            font-size: $view-xs-font-size
//        }
//    }
//    @media (min-width: 480px) {
//        .#{$class} {
//            font-size: $view-sm-font-size;
//        }
//    }
//    @media (min-width: 640px) {
//        .#{$class} {
//            font-size: $view-ms-font-size
//        }
//    }
//    @media (min-width: 720px) {
//        .#{$class} {
//            font-size: $view-md-font-size
//        }
//    }
//    @media (min-width:980px) {
//        .#{$class} {
//            font-size: $view-lg-font-size
//        }
//    }
//    @media (min-width:1200px) {
//        .#{$class} {
//            font-size: $view-xl-font-size
//        }
//    }
}
//循环设置不同宽度的em
@mixin sys-em-loop($width : 200, $view-base : 640, $font-px-base : 40px, $class : 'ems'){
    @while $width < $view-base + 1 {
        $widthpix : $width * 1px;
        @media (min-width: $widthpix) {
            .#{$class} {
                font-size: ceil($font-px-base * $width / $view-base);
            }
        }
        $width : $width + $rem-loop-num;
    }
}

////自适应代码函数////
$sys-media-rule-flag:1;
@mixin sys-media-rules($flag:$sys-media-rule-flag){
    @if $flag == 1 {
        @content;
    }
}

////兼容代码函数////
$sys-compatible-rule-flag:1;
@mixin sys-compatible-rules($flag:$sys-compatible-rule-flag){
    @if $flag == 1 {
        @content;
    }
}

////ie8及以下兼容
$sys-compatible-ie8-rule-flag:1;
@mixin sys-compatible-ie8-rules($flag:$sys-compatible-ie8-rule-flag){
    @if $flag == 1 {
        @content;
    }
}

////ie7及以下兼容
$sys-compatible-ie7-rule-flag:1;
@mixin sys-compatible-ie7-rules($flag:$sys-compatible-ie7-rule-flag){
    @if $flag == 1 {
        @content;
    }
}